<?php


require_once("DButil.php");
$data=$_REQUEST["teacherId"];
$sql="select teacherId,teacherName,username,password,status,roleId from t_teacher where teacherId={$data} ";
$arr=query($sql)[0];
$sql2="select roleId,roleName from t_role";
$arr2=query($sql2);
$result=[
    "teacher" =>$arr,
    "role" =>$arr2
];

header("Content-Type:application/json;charset=utf-8");
echo json_encode($result);
?>